Carbon


PBHGetVInfoAsync

Header: Files.h Carbon status: Supported

Gets detailed information about a volume.

OSErr PBHGetVInfoAsync (
    HParmBlkPtr paramBlock
);
paramBlock

A pointer to a basic HFS parameter block.

function result

A result code.

DISCUSSION

The relevant fields of the parameter block are:

The PBHGetVInfoAsync function returns information about the specified volume. If the value of ioVolIndex is positive, the File Manager attempts to use it to find the volume; for instance, if the value of ioVolIndex is 2, the File Manager attempts to access the second mounted volume in the VCB queue. If the value of ioVolIndex is negative, the File Manager uses ioNamePtr and ioVRefNum in the standard way to determine the volume. If the value of ioVolIndex is 0, the File Manager attempts to access the volume by using ioVRefNum only.

You can read the ioVDrvInfo and ioVDRefNum fields to determine whether the specified volume is online, offline, or ejected. You can get information about all the online volumes by making repeated calls to PBHGetVInfoAsync, starting with the value of ioVolIndex set to 1 and incrementing that value until PBHGetVInfoAsync returns nsvErr.

The values returned in the ioVNmAlBlks and ioVFrBlk fields are unsigned integers. You need to exercise special care when reading those values from Pascal.

AVAILABILITY

Supported in Carbon. Available in Mac OS 8.1 and later when Carbon 1.0.2 or later is present.


© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)